﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Threading;
using System.Windows.Forms;

namespace StrHelper
{
	public partial class MainForm : Form
	{
		public MainForm()
		{
			InitializeComponent();
		}
		
		void RichTextBox1TextChanged(object sender, EventArgs e)
		{
			richTextBox2.Text = richTextBox1.Text.Replace("\"", "").Replace("\\t", "\t").Replace("\\r\\n", "\r\n");
		}
		
		void Button1Click(object sender, EventArgs e)
		{
			if (richTextBox2.Text != "") {
				Clipboard.SetText(richTextBox2.Text);
				new Thread(UpdateCopiedStatus).Start();
			}
		}
		
		void UpdateCopiedStatus()
		{
			toolStripStatusLabel1.Text = "Copied!";
			Thread.Sleep(1000);
			toolStripStatusLabel1.Text = "Ready";
		}
	}
}
